<template>
	<view>
		<view class="cu-modal" :class="modalName=='RadioModal'?'show':''">
			<view class="cu-dialog">
				<view class="cu-bar justify-end">
					<view class="content">相框类别</view>
					<view class="action" @tap="hideMoadl">
						<text class="cuIcon-close text-red"></text>
					</view>
				</view>
				<view class="padding-sm" style="height: 50vh;overflow-y: auto;">
					<radio-group class="block" @change="RadioChange">
						<view class="cu-list menu text-left">
							<view class="cu-item" v-for="(item,index) in classifyArr" :key="index">
								<label class="flex justify-between align-center flex-sub">
									<view class="title">{{item}}</view>
									<radio :class="radio == item?'checked':''" :checked="radio == item?true:false" :value="item"></radio>
								</label>
							</view>
						</view>
					</radio-group>
				</view>
				<view class="cu-bar" style="border-bottom: none; border-top:1px solid #ccc;">
					<view class="action margin-0 flex-sub  solid-left" @tap="sendUploadImgs">发送</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		props: ['classifyArr'],
		data(){
			return{
				modalName:'',
				radio:'默认'
			}
		},
		created() {
			console.log(this.classifyArr,'classifyArr')
		},
		mounted() {
			
		},
		methods:{
			RadioChange(e) {
				// console.log(e.detail.value,'RadioChange')
				this.radio = e.detail.value
			},
			sendUploadImgs(){
				this.modalName = '';
				this.$emit('activeClassifyName', this.radio)
			},
			hideMoadl(){
				this.radio = '默认';
				this.modalName = '';
			}
		}
	}
</script>

<style scoped>
	@import "../../colorui/main.css";
	@import "../../colorui/icon.css";
	
	.cu-dialog{
		color: #fff;
		background-color: #535178;
	}
	
	.cu-bar{
		border-bottom: 1px solid #ccc;
	}
	.cu-form-group,.cu-item {
		background-color: #535178 !important;
	}
	radio::before{
		content: '';
	}
</style>
